//
//  WhereNode.m
//  DataCollector
//
//  Created by jiro on 12/06/28.
//  Copyright 2012 jiro music. All rights reserved.
//

#import "WhereNode.h"

WhereNode::WhereNode()
{
	conditionNode = NULL;
}

WhereNode::WhereNode( const ExpressionNode& condition )
{
	conditionNode = new ExpressionNode( condition );
}

WhereNode::~WhereNode()
{
	if ( conditionNode != NULL )
	{
		delete conditionNode;
	}
}

NSString* WhereNode::query() const
{
	NSString* s = [ NSString stringWithFormat: @"where %@", conditionNode->query() ];
	return s;
}
